#include <QtGui/QApplication>
#include <QtGui/QLabel>
#include <stdio.h>
#include "QtCore/QTextCodec"

#include "QtCore/QString"
#include "QtCore/QDate"
#include "QtCore/QDebug"
#include "QtCore/QSettings"
#include "QtGui/QApplication"

#include "QtGui/QDialog"


#include <Qt/QtGui>
#include "Qt/QtCore"

#include <QtGui/QPushButton>

#include "ui/ui_test_ui.h"


#include "MainWindow.h"

#include "MyDialog.h"


int main(int argc, char **argv) {

    QApplication app(argc, argv);

    //设置qstring 汉字默认码 编u编tf8
    QTextCodec *qTextCodec = QTextCodec::codecForName("UTF-8");
    QTextCodec::setCodecForCStrings(qTextCodec);//
    QTextCodec::setCodecForLocale(qTextCodec);//consle
    QTextCodec::setCodecForTr(qTextCodec);


    const char *_name = "哈哈哈哈";
    QString qString(_name);


    char _array_name[] = "哈哈哈";
    printf("---------测试中文:%s\n", _array_name);
    //
    qDebug() << "Date:" << QDate::currentDate();
    qDebug() << "Types:" << QString("String") << QChar('x') << QRect(0, 10, 50, 40);

    QString a = "我是汉字";


    qDebug("qDebug 测试 ......");

//    QLabel label(a);
//    label.show();

//    QDialog dialog;

//    Ui_test_Form test_form;
//    test_form.setupUi(&dialog);

//    dialog.show();


    MyDialog *myDialog = new MyDialog;
    myDialog->setAcceptDrops(false);
    myDialog->show();// widget

//    QMainWindow *qMainWindow = new QMainWindow;
//    MainWindow mainWindow;
//    mainWindow.setupUi(qMainWindow);
//    mainWindow.setAcceptDrops(false);
//    mainWindow.adjustSize();
//    QVBoxLayout *qvBoxLayout = new QVBoxLayout;
//    qvBoxLayout->addWidget(myDialog);
//    mainWindow.setLayout(qvBoxLayout);
//    mainWindow.show();


    return app.exec();
}
